export default {
    obj2search: function (obj) {
        var str = '';
        for (var key in obj) {
            str += '&' + key + '=' + obj[key];
        }
        return str.slice(1);
    },
    search2obj: function (str) {
        var obj = {};
        str.split('&').forEach(function (item) {
            var _a = item.split('='), key = _a[0], value = _a[1];
            obj[key] = value;
        });
        return obj;
    }
};
